package com.example.negativescreendemo;

import com.example.negativescreendemo.adapter.NegativeScreenAdapter;

import java.util.List;

/**
 * @author: njb
 * @date: 2025/8/20 21:21
 * @desc: 描述
 */
public class CardItem {
    private NegativeScreenAdapter.CardType type;
    private String title;
    private List<ActionItem> actionItems;
    private List<ScheduleItem> scheduleItems;
    private List<NewsItem> newsItems;
    private List<TodoItem> todoItems;

    // 私有构造方法，防止直接实例化
    private CardItem() {}

    /**
     * 创建快捷操作卡片
     */
    public static CardItem createActionCard(NegativeScreenAdapter.CardType type, String title, List<ActionItem> actionItems) {
        CardItem item = new CardItem();
        item.type = type;
        item.title = title;
        item.actionItems = actionItems;
        return item;
    }

    /**
     * 创建日程卡片
     */
    public static CardItem createScheduleCard(NegativeScreenAdapter.CardType type, String title, List<ScheduleItem> scheduleItems) {
        CardItem item = new CardItem();
        item.type = type;
        item.title = title;
        item.scheduleItems = scheduleItems;
        return item;
    }

    /**
     * 创建新闻卡片
     */
    public static CardItem createNewsCard(NegativeScreenAdapter.CardType type, String title, List<NewsItem> newsItems) {
        CardItem item = new CardItem();
        item.type = type;
        item.title = title;
        item.newsItems = newsItems;
        return item;
    }

    /**
     * 创建待办事项卡片
     */
    public static CardItem createTodoCard(NegativeScreenAdapter.CardType type, String title, List<TodoItem> todoItems) {
        CardItem item = new CardItem();
        item.type = type;
        item.title = title;
        item.todoItems = todoItems;
        return item;
    }

    // Getters
    public NegativeScreenAdapter.CardType getType() {
        return type;
    }

    public String getTitle() {
        return title;
    }

    public List<ActionItem> getActionItems() {
        return actionItems;
    }

    public List<ScheduleItem> getScheduleItems() {
        return scheduleItems;
    }

    public List<NewsItem> getNewsItems() {
        return newsItems;
    }

    public List<TodoItem> getTodoItems() {
        return todoItems;
    }
}
